/********************************************************************************
  Copyright (c) 2015 Huajie IMI Technology Co., Ltd.
  All rights reserved.

  @File Name     : ImiProperties.h
  @Author        : Chen Shangwei
  @Date          : 2015-05-14
  @Description   : Define ImiNect Propeties
  @Version       : 0.1.0

  @History       :
  1.2015-05-14 Chen Shangwei Created file

********************************************************************************/

#ifndef _IMI_C_PROPERTIES_H_
#define _IMI_C_PROPERTIES_H_

// Public Properties
typedef enum
{
    //General,
    IMI_PROPERTY_GENERAL_VERSION       = 0x00,//ImiVersions Read Only
    IMI_PROPERTY_GENERAL_SERIAL_NUMBER = 0x01,//String, Read Only
    IMI_PROPERTY_GENERAL_FRAME_SYNC    = 0x02, //Bool
	IMI_PROPERTY_IMAGE_REGISTRATION    = 0x03, // enum ImiImageRegistrationMode


    // Color,
    IMI_PROPERTY_COLOR_MIRROR     = 0x13, //uint8_t, 1:mirror, 0: not mirror
    IMI_PROPERTY_COLOR_SHARPNESS  = 0x14, //Not Support Yet
    IMI_PROPERTY_COLOR_BRIGHTNESS = 0x15, //Not Support Yet
    IMI_PROPERTY_COLOR_CONTRAST   = 0x16, //Not Support Yet
    IMI_PROPERTY_COLOR_SATURATION = 0x17, //Not Support Yet
    IMI_PROPERTY_COLOR_GAIN       = 0X18, //Not Support Yet
    IMI_PROPERTY_COLOR_AUTO_WHITE_BALANCE_MODE = 0x19, //Not Support Yet
    IMI_PROPERTY_COLOR_AUTO_EXPOSURE_MODE      = 0x1a, //Not Support Yet
    IMI_PROPERTY_COLOR_ANTIFLICKER             = 0x1b, //Not Support Yet

    //Depth,
    IMI_PROPERTY_DEPTH_HOLE_FILTER = 0x33,//Not Support Yet
    IMI_PROPERTY_DEPTH_MIRROR      = 0x34, //uint8_t, 1:mirror, 0: not mirror
    IMI_PROPERTY_DEPTH_DECIMATION  = 0x35,//Not Support Yet

	//Skeleton,
	IMI_PROPERTY_SKELETON_SMOOTH    = 0x40,
	IMI_PROPERTY_SKELETON_MIRROR    = 0x41,
	IMI_PROPERTY_SKELETON_USER_SELECTOR_MODE     = 0x53,
	IMI_PROPERTY_SKELETON_SELECT_TRACK_USER      = 0x54,
	IMI_PROPERTY_SKELETON_UNSELECT_TRACK_USER    = 0x55,
	IMI_PROPERTY_SKELETON_CALIBRATION            = 0x57,  // uint8_t, 1:use calibration, 0: don't use calibration, default 0

}ImiPropertyEnum;

// Pixel Format
typedef enum
{
    IMI_PIXEL_FORMAT_DEP_16BIT                  = 0x00, //Depth

    IMI_PIXEL_FORMAT_IMAGE_YUV422               = 0x01, //Rgb
    IMI_PIXEL_FORMAT_IMAGE_H264                 = 0x02, //H264 Compressed
    IMI_PIXEL_FORMAT_IMAGE_RGB24                = 0x03,
    IMI_PIXEL_FORMAT_IMAGE_YUV420SP             = 0x04  //NV21
} ImiPixelFormat;

// Image mirror's values
enum ImiMirror
{
    PARAM_MIRROR_DISABLE      = 0x00,
    PARAM_MIRROR_ENABLE       = 0x01
};

// Color brightness's values
enum ImiColorBrightness
{
    PARAM_COLOR_BRIGHTNESS_DEFAULT  = 0x00,
    PARAM_COLOR_BRIGHTNESS_ADD_1    = 0x01,
    PARAM_COLOR_BRIGHTNESS_ADD_2    = 0x02,
    PARAM_COLOR_BRIGHTNESS_ADD_3    = 0x03,
    PARAM_COLOR_BRIGHTNESS_ADD_4    = 0x04,
    PARAM_COLOR_BRIGHTNESS_REDUCE_1 = 0x05,
    PARAM_COLOR_BRIGHTNESS_REDUCE_2 = 0x06,
    PARAM_COLOR_BRIGHTNESS_REDUCE_3 = 0x07,
    PARAM_COLOR_BRIGHTNESS_REDUCE_4 = 0x08
};

// Color contrast's values
enum ImiColorContrast
{
    PARAM_COLOR_CONTRAST_DEFAULT    = 0x00,
    PARAM_COLOR_CONTRAST_ADD_1      = 0x01,
    PARAM_COLOR_CONTRAST_ADD_2      = 0x02,
    PARAM_COLOR_CONTRAST_ADD_3      = 0x03,
    PARAM_COLOR_CONTRAST_ADD_4      = 0x04,
    PARAM_COLOR_CONTRAST_REDUCE_1   = 0x05,
    PARAM_COLOR_CONTRAST_REDUCE_2   = 0x06,
    PARAM_COLOR_CONTRAST_REDUCE_3   = 0x07,
    PARAM_COLOR_CONTRAST_REDUCE_4   = 0x08
};

// Color saturation's values
enum ImiColorSaturation
{
    PARAM_COLOR_SATURATION_DEFAULT  = 0x00,
    PARAM_COLOR_SATURATION_ADD_1    = 0x01,
    PARAM_COLOR_SATURATION_ADD_2    = 0x02,
    PARAM_COLOR_SATURATION_ADD_3    = 0x03,
    PARAM_COLOR_SATURATION_ADD_4    = 0x04,
    PARAM_COLOR_SATURATION_REDUCE_1 = 0x05,
    PARAM_COLOR_SATURATION_REDUCE_2 = 0x06,
    PARAM_COLOR_SATURATION_REDUCE_3 = 0x07,
    PARAM_COLOR_SATURATION_REDUCE_4 = 0x08
};

// Color auto white balance's values
enum ImiColorWhiteBalance
{
    PARAM_COLOR_WHITE_BALANCE_AUTO          = 0x00,
    PARAM_COLOR_WHITE_BALANCE_MANUAL_SUNNY  = 0x01,
    PARAM_COLOR_WHITE_BALANCE_MANUAL_CLOUDY = 0x02,
    PARAM_COLOR_WHITE_BALANCE_MANUAL_OFFICE = 0x03,
    PARAM_COLOR_WHITE_BALANCE_MANUAL_HOME   = 0x04,
    PARAM_COLOR_WHITE_BALANCE_MANUAL_NIGHT  = 0x05
};

// Color auto exposure's values
enum ImiColorAutoExposure
{
    PARAM_COLOR_AUTO_EXPOSURE_MODE_DISABLE  = 0x00,
    PARAM_COLOR_AUTO_EXPOSURE_MODE_ENABLE   = 0x01
};

// Light mode
enum ImiLightMode
{
    IMI_LIGHT_MODE_SUNNY  = 0x00,
    IMI_LIGHT_MODE_CLOUDY = 0x01,
    IMI_LIGHT_MODE_OFFICE = 0x02,
    IMI_LIGHT_MODE_HOME   = 0x03,
    IMI_LIGHT_MODE_NIGHT  = 0x04
};

enum ImiImageRegistrationMode
{
    IMI_IMAGE_REGISTRATION_OFF				= 0,
	IMI_IMAGE_REGISTRATION_DEPTH_TO_COLOR	= 1,
};

#pragma pack (push, 1)

typedef struct tag_imi_sdk_version {
    uint8_t major;
    uint8_t minor;
    uint16_t revision;
} imi_sdk_version;

typedef struct tag_imi_fw_version {
    uint8_t major;
    uint8_t minor;
    uint16_t revision;
	uint8_t ap_major;
	uint8_t ap_minor;
	uint16_t ap_version;
} imi_fw_version;

typedef struct tag_imi_hw_version {
    uint8_t hardware;
    uint8_t chip;
	uint8_t ap_hardware;
} imi_hw_version;

typedef struct {
	imi_sdk_version sdk_version;
    imi_fw_version fw_version;
    imi_hw_version hw_version;
} ImiVersions;

#pragma pack(pop)

#endif // _IMI_C_PROPERTIES_H_
